#ifndef _GAME_H
#define _GAME_H
#include "arm_2d.h"
#include "example_gui.h"
#include "app_platform.h"
#include "arm_2d_helper.h"
#include "DEV_Config.h"
#include "hardware/gpio.h"
#include "play.h"

#define LEAFCOLOR 0x9587
#define WOODCOLOR 0xa883
#define BACKGROUND_COLOR  0xbf5e
#define JULI  300
#define ICE_NUM 2
#define DISAPPEAR 0
#define DISAPPEAR_TIME 600

typedef struct{
		uint32_t iX;
		uint8_t iHight;
		uint8_t iGap;
		uint8_t mode;

}playgame_obstacle_t;

typedef struct location_t {
    uint32_t iX;
    int32_t iY;
} location_t;

typedef struct  {
    uint8_t flag;
	uint8_t time;
    int16_t iY;
	int16_t iX;
    uint16_t angle;
} ice_block_iY_t;

extern const arm_2d_tile_t c_tilePeople1;
extern const arm_2d_tile_t c_tilePeople2;
extern const arm_2d_tile_t c_tile1101;
extern const arm_2d_tile_t c_tile11[];
extern const arm_2d_tile_t c_tile011[6];

extern const arm_2d_tile_t c_tile4401;
extern const arm_2d_tile_t c_tile4402;
extern const arm_2d_tile_t c_tile4403;
extern const arm_2d_tile_t c_tile4404;
extern const arm_2d_tile_t c_tile44[6];

extern const arm_2d_tile_t c_tile3301;
extern const arm_2d_tile_t c_tile3302;
extern const arm_2d_tile_t c_tile3303;
extern const arm_2d_tile_t c_tile33[];

extern const arm_2d_tile_t c_tileWoodLeft;
extern const arm_2d_tile_t c_tileWoodUp;
extern const arm_2d_tile_t c_tileIce;
extern const arm_2d_tile_t c_tilePipe;
//#define WOODCOLOR 0xa883
extern const arm_2d_tile_t c_tileWoodLeft;
extern const arm_2d_tile_t c_tileWoodUp;
extern const arm_2d_tile_t c_tileLeafDown;
extern const arm_2d_tile_t c_tileLeaf;
extern const arm_2d_tile_t c_tileTree[];

int myrand(void);
void paly_game_gui_refresh(const arm_2d_tile_t *ptTile, bool bIsNewFrame);
 uint8_t get_key();
void key_init();
void play_game_ys();
void ice_block_iY_up_down(uint8_t i,int16_t ix_x);

















#endif
